from django.conf.urls.defaults import *
from django.views.generic import DetailView, ListView
from notebook.models import Note

urlpatterns = patterns('',
        # Generic views
        url(r'^$',
            ListView.as_view(
                queryset=Note.objects.order_by('-curr_date')[:5],
                context_object_name='latest_note',
                template_name='notebook/index.html')),
        url(r'(?P<pk>\d+)/$',
            DetailView.as_view(
                model=Note,
                template_name='notebook/detail.html')),
        #url(r'(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
)
